#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <assert.h>
int my_memcmp(const void* s1, const void* s2, size_t num)
{
	assert(s1 && s2);
	while (num--)
	{
		if (*(char*)s1 > *(char*)s2)
			return 1;
		else if(*(char*)s1 < *(char*)s2)
			return -1;
		else
			{
				s1 = (char*)s1 + 1;
				s2 = (char*)s2 + 1;
			}
	}
	return 0;
}

int main()
{
	int arr1[] = { 1,2,3,4,5 };
	int arr2[] = { 1,2,3,7,9 };
	int ret = my_memcmp(arr1, arr2, 13);
	printf("%d", ret);
	return 0;
}